package com.ruoyi.factory.manpower.domain;

/**
 * 开放接口响应参数
 *
 * @author WEIXING
 * @date 2020/11/25 16:20
 */
public class OpenResp  extends BaseObject {

    //应用ID，一卡通系统分配
    private String appid;
    //返回结果：100成功，其他失败
    private int retcode;
    //返回描述
    private String retmsg;
    //业务结果，json格式字符串
    private String data;
    //签名值
    private String sign;

    public String getAppid() {
        return appid;
    }

    public OpenResp setAppid(String appid) {
        this.appid = appid;
        return this;
    }

    public int getRetcode() {
        return retcode;
    }

    public OpenResp setRetcode(int retcode) {
        this.retcode = retcode;
        return this;
    }

    public String getRetmsg() {
        return retmsg;
    }

    public OpenResp setRetmsg(String retmsg) {
        this.retmsg = retmsg;
        return this;
    }

    public String getData() {
        return data;
    }

    public OpenResp setData(String data) {
        this.data = data;
        return this;
    }

    public String getSign() {
        return sign;
    }

    public OpenResp setSign(String sign) {
        this.sign = sign;
        return this;
    }

    public static OpenResp build(OpenRespCode respCode) {
        return build(respCode.getCode(), respCode.getMsg());
    }

    public static OpenResp build(OpenRespCode respCode, String retmsg) {
        return build(respCode.getCode(), retmsg);
    }

    public static OpenResp build(int retcode, String retmsg) {
        return new OpenResp().setRetcode(retcode).setRetmsg(retmsg);
    }

}
